'''
Find a Function
'''
def isfunction(a,d):
    A=a
    b=a+d
    B=b
    for i in range(9):
        a=a+2*d
        A=A+a
    for j in range(9):
        b=b+2*d
        B=B+b
    if A==300 and B==330:
        return 1
    else:
        return 0
for a in range(4):
    for d in range(4):
        if isfunction(a,d)==1:
            print(a,d)